Skip to content

docs(rokt): session management guidance for the kit - #821

Merged
nickolas-dimitrakas merged 2 commits into
mainfrom
rokt/kit-session-docs
Aug 21, 2026
Merged

docs(rokt): session management guidance for the kit#821
nickolas-dimitrakas merged 2 commits into
mainfrom
rokt/kit-session-docs

Conversation

@nickolas-dimitrakas

Copy link
Copy Markdown
Contributor

What

Kit README section documenting session management — the mParticle-side counterpart of the SDK docs in ROKT/rokt-sdk-ios#299:

  • the automatic identity-driven behaviour introduced in feat(rokt): forward MPRokt.clearSession to the Rokt SDK #819, as a transition table (anonymous→known keeps the session; a different known user or a logout ends it)
  • the recommended self-service-terminal pattern: log out (or identify the next customer) between transactions
  • the manual MPRokt.clearSession() escape hatch from feat(rokt): add MPRokt clearSession passthrough #818, when the new session begins, no-op/idempotency notes, and the collision-safety of combining manual + automatic
  • the caching recommendation for shared terminals

Docs only. Stacked on #819 — its base is that branch; retargets to the default branch cleanly once #819 lands.

🤖 Generated with Claude Code

@nickolas-dimitrakas
nickolas-dimitrakas requested a review from a team as a code owner August 20, 2026 19:24
@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only README update; no code, auth, or data-handling changes.

Overview
Documents Rokt session behavior in the kit README: sessions are automatic for a single user and do not reset on mParticle login/logout or identity change.

Adds a kiosk/shared-device pattern: call MParticle.sharedInstance().rokt.clearSession() at the customer boundary (not between screens), with notes on when the next session starts, event flush, idempotency, getSessionId hand-off, and avoiding experience caching.

Reviewed by Cursor Bugbot for commit f3e3292. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions

github-actions Bot commented Aug 20, 2026

Copy link
Copy Markdown

📦 SDK Size Impact Report

Measures how much the SDK adds to an app's size (with-SDK minus without-SDK).

Metric Target Branch This PR Change
App Bundle Impact 1.79 MB 1.79 MB +N/A
Executable Impact 848 bytes 848 bytes +N/A
XCFramework Size 6.49 MB 6.49 MB +N/A

➡️ SDK size impact change is minimal.

Raw measurements

Target branch (main):

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1920,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1836,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6648}

This PR:

{"baseline_app_size_kb":84,"baseline_executable_size_bytes":75464,"with_sdk_app_size_kb":1920,"with_sdk_executable_size_bytes":76312,"sdk_impact_kb":1836,"sdk_executable_impact_bytes":848,"xcframework_size_kb":6648}

thomson-t
thomson-t previously approved these changes Aug 20, 2026
stack merge was automatically disabled August 21, 2026 20:26

Pull Request is not mergeable

stack merge was automatically disabled August 21, 2026 20:27

Pull Request is not mergeable

Base automatically changed from rokt/kit-clear-session-on-identity-change to main August 21, 2026 20:33
nickolas-dimitrakas and others added 2 commits August 21, 2026 16:33
Documents the automatic identity-driven session behaviour (typed
transitions), the recommended kiosk pattern (logout between customers),
the manual MPRokt.clearSession escape hatch, and when the new session
begins.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
trunk-check failed with "1 unformatted file" -- this PR's only file.

Reading it to fix the formatting surfaced a larger problem: the page
documented the automatic identity-driven reset, which was removed from
the kit before shipping. Every substantive claim had gone stale --
"the kit ends the Rokt session whenever the mParticle user changes",
the identity-transition table, and "No integration code is needed".

The kiosk guidance was the damaging part. It told partners to log the
user out between transactions and let the kit reset for them; with no
automatic path that produces no reset at all, which is exactly the
shared-terminal session bleed this work exists to fix. Publishing it
would have handed the affected partners the wrong instruction.

Rewritten to describe what ships: no automatic reset, explicit
clearSession at the transaction boundary, and why the identity signal
was rejected -- an MPID can move mid-journey for one customer.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@nickolas-dimitrakas
nickolas-dimitrakas merged commit 1a72c25 into main Aug 21, 2026
2 of 3 checks passed
@nickolas-dimitrakas
nickolas-dimitrakas deleted the rokt/kit-session-docs branch August 21, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants